package br.com.iswe.gwt.ui.client.service;

import java.util.List;

import br.com.iswe.core.entidades.gwt.RemoteEntityObject;
import br.com.iswe.gwt.ui.client.RequestInfo;
import br.com.iswe.gwt.ui.client.exp.ISWERpcException;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("manterService")
public interface MethodService<R extends RemoteEntityObject, P extends RemoteEntityObject> extends RemoteService {

	R executeMethod(String controllerName, String methodName, P parameter, RequestInfo requestInfo) throws ISWERpcException;
	
	R executeMethod(String controllerName, String methodName, List<P> parameterList, RequestInfo requestInfo) throws ISWERpcException;
	
	
	List<R> executeMethodAsList(String controllerName, String methodName, P parameter, RequestInfo requestInfo) throws ISWERpcException;
	
	List<R> executeMethodAsList(String controllerName, String methodName, List<P> parameterList, RequestInfo requestInfo) throws ISWERpcException;
	
}
